package org.weasel.business;

import java.util.ArrayList;

public class Unscheduled {

	private String id;
	private ArrayList<UserStory> userStories;
	
	
	public Unscheduled(String id, ArrayList<UserStory> userStories) {
		this.id = id;
		if (userStories != null)
			this.userStories = userStories;
		else
			this.userStories = new ArrayList<UserStory>();
	}


	public String getId() {
		return id;
	}


	public ArrayList<UserStory> getUserStories() {
		return userStories;
	}


	public void setUserStories(ArrayList<UserStory> userStories) {
		this.userStories = userStories;
	}
	
	public UserStory getUserStory(String id){
		for (UserStory us : userStories) {
			if (us.getId().equals(id))
				return us;
		}
		return null;
	}
	
	public void addUserStory(UserStory userStory){
		userStories.add(userStory);
	}
	
	public void removeUserStory(String id){
		UserStory us;
		for (int i = 0; i<userStories.size(); i++){
			us = userStories.get(i);
			if (us.getId().equals(id)){
				userStories.remove(i);
				return;
			}
		}
	}
	
	
	
	
}
